1. Field of the Invention
Methods and apparatuses consistent with the present invention relate to measuring a round trip time (RTT) between devices, and more particularly to, checking proximity between devices by measuring the RTT.
2. Description of the Related Art
FIG. 1 is a diagram illustrating a network environment to which a conventional proximity check is applied. Referring to FIG. 1, a contents provider (CP) 11 provides contents to a device A 12 that is authorized to access contents. Since an owner of the device A 12 is authorized to use the contents, the contents are only provided to devices B and C 13 and 14 owned by an authorized user. However, the contents must not allowed to a device D 15 that is not in a home network of the owner of the device A 12 but in an external network in order to prevent the contents from being illegally distributed although the device D 15 is authorized to access the contents. Therefore, the proximity between the device A 12 and other devices must be checked in advance in order to determine whether to transmit the contents from the device A 12 to other devices.
FIG. 2 is a flowchart illustrating a conventional proximity check protocol. Referring to FIG. 2, in Operation 21, a device A 1 encrypts N random number pairs {Ra, Rb}1, {Ra, Rb}2, . . . , {Ra, Rb}N and the number N of the random number pairs using a public key PubB of a device B 4 and transmits a setup request message including the encrypted N random number pairs {Ra, Rb}1, {Ra, Rb}2, . . . , {Ra, Rb}N and the number N of the random number pairs, i.e., E(PubB, [N, {Ra, Rb}1, {Ra, Rb}2, . . . , {Ra, Rb}N]), to a device B 4 in order to request the device B 4 to set up a proximity check between the device A 3 and the device B 4.
In Operation 22, the device B 4 decrypts E(PubB, [N, {Ra, Rb}1, {Ra, Rb}2, . . . , {Ra, Rb}N]), included in the setup request message using a private key PrivB of the device B 4, creates a setup response message indicating that the proximity check between the device A 3 and the device B 4 is completely set up, and transmits the setup response message to the device A 3.
In Operation 23, the device A 3 creates a challenge request message including a random number {Ra}1 among N random numbers {Ra}1, {Ra}2, . . . , {Ra}N and I=1, i.e., {1, {Ra}1}, and transmits the challenge request message to the device B 4 in order to challenge a successful proximity check between the device A 3 and the device B 4. Also, the device A 3 measures the time when the challenge request message is transmitted, thereby starting to measure an RTT of the device B 4.
In Operation 24, the device B 4 compares the random number {Ra}1 included in the challenge request message with the random number {Ra}1 corresponding to I=1 included in the challenge request message among the N random numbers {Ra}1, {Ra}2, . . . , {Ra}N. If both numbers are identical to each other, the device B 4 determines that the random number included in the challenge request message is authentic, and if both numbers are not identical to each other, determines that the random number included in the challenge request message is not authentic. If the device B 4 determines that the random number included in the challenge request message is authentic, the device B 4 creates a challenge response message including a random number {Rb}1 corresponding to I=1 included in the challenge request message among N random numbers {Rb}1, {Rb}2, . . . , {Rb}N and I=1, i.e., [1, {Rb}1], and transmits the challenge response message to the device A 3.
In Operation 24, the device A 3 receives the challenge response message including [1, {Rb}1] and measures a time when the challenge response message is received, thereby completing to measure the RTT of the device B 4. That is, the RTT is obtained by subtracting the time when the challenge request message is transmitted from the time when the challenge response message is received. Also, the device A 3 compares the random number {Rb}1 included in the challenge response message with {Rb}1 corresponding to I=1 included in the challenge response message among the N random numbers {Rb}1, {Rb}2, . . . , {Rb}N. If both numbers are identical to each other, the device A 3 determines that the random number included in the challenge response message is authentic. If both numbers are not identical to each other, the device A 3 determines that the random value included in the challenge response message is not authentic.
In Operation 24, if the device A 3 determines that the random value included in the challenge response message is authentic, the device A 3 compares the RTT with a proximity critical value. If the RTT is determined to be smaller than the proximity critical value, the device A 3 determines the devices A 3 and B 4 to be proximate to each other, and determines the proximity check between the devices A 3 and B 4 to be successful. If the device A 3 determines that the RTT is not smaller than the proximity critical value, the device A 3 determines that the devices A 3 and B 4 are not proximate to each other, increases I by 1, and compares I with N. If I is determined to be smaller than N, the device A 3 performs Operation 23. If I is determined not to be smaller than N, the device A 3 determines the proximity check between the devices A 3 and B 4 to be unsuccessful.
RTT is not measured once but several tens of times through several thousands of times in order to check the proximity between the devices A 3 and B 4. Even if RTT is measured once that the devices A 3 and B 4 are proximate to each other due to variability of traffic on a transmission path of a network, the devices A 3 and B 4 are considered to be proximate to each other. However, since the RTT measurement of several tens of times through several thousands of times requires encryptions and decryptions of several tens of times through several thousands of times, it is very inefficient and places considerable load on both systems of the devices A 3 and B 4.